<script setup>
import { useRouter, useRoute } from 'vue-router'
import { ref } from 'vue'
// const message = ref({
//   f_name:'setOrderId'
// })
const router = useRouter()
const route = useRoute()
const data = {
  f_name:'setOrderId',
  order_id:'230531165458ff00000461854'
}
const message = data
function onpay(){
  // alert('测试')
  window.parent.postMessage(message, '*');
}
</script>

<template>
  <div>
    <div >
    <button @click="onpay()">
      {{  route}}
      下单我是子页面内容

      <div>sys_key:{{ route.query.sys_key }}</div>
      <div>uid:{{ route.query.uid }}</div>
      <div>pubkey:{{ route.query.pubkey }}</div>
      <div>acToken:{{ route.query.acToken }}</div>
      <div>mid:{{ route.query.mid }}</div>
      <div>timestamp:{{ route.query.timestamp }}</div>
    </button>
  </div>
  </div>
</template>

<style></style>